.TH "src/common_util/verutil.h" 3 "common_util" \" -*- nroff -*-
.ad l
.nh
.SH NAME
src/common_util/verutil.h \- Version utilities\&.  

.SH SYNOPSIS
.br
.PP
\fR#include <string>\fP
.br

.SS "Functions"

.in +1c
.ti -1c
.RI "bool \fBcutl::is_version\fP (const std::string &text)"
.br
.RI "Check if a string is a valid version\&. "
.ti -1c
.RI "std::string \fBcutl::get_version\fP (const std::string &text)"
.br
.RI "Parse a version string from a text\&. "
.ti -1c
.RI "int \fBcutl::compare_version\fP (const std::string &v1, const std::string &v2)"
.br
.RI "Compare two version strings\&. "
.in -1c
.SH "Detailed Description"
.PP 
Version utilities\&. 


.PP
\fBCopyright\fP
.RS 4
Copyright (c) 2024, Spencer\&.Luo\&. All Rights Reserved\&.
.RE
.PP
Licensed under the Apache License, Version 2\&.0 (the 'License'); you may not use this file except in compliance with the License\&. You may obtain a copy of the License at 
.PP
.nf
  http://www\&.apache\&.org/licenses/LICENSE-2\&.0

.fi
.PP
 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied\&. See the License for the specific language governing permissions and limitations\&.
.PP
\fBAuthor\fP
.RS 4
spencer\&.luo 
.RE
.PP
\fBDate\fP
.RS 4
2024-05-13 
.RE
.PP

.SH "Function Documentation"
.PP 
.SS "int cutl::compare_version (const std::string & v1, const std::string & v2)"

.PP
Compare two version strings\&. 
.PP
\fBParameters\fP
.RS 4
\fIv1\fP version string 1\&. 
.br
\fIv2\fP version string 2\&. 
.RE
.PP
\fBReturns\fP
.RS 4
int The result of the comparison\&. -1 if v1 < v2, 0 if v1 == v2, 1 if v1 > v2\&. 
.RE
.PP

.SS "std::string cutl::get_version (const std::string & text)"

.PP
Parse a version string from a text\&. 
.PP
\fBParameters\fP
.RS 4
\fItext\fP The text to parse\&. 
.RE
.PP
\fBReturns\fP
.RS 4
std::string The parsed version string\&. 
.RE
.PP

.SS "bool cutl::is_version (const std::string & text)"

.PP
Check if a string is a valid version\&. 
.PP
\fBParameters\fP
.RS 4
\fItext\fP The string to check\&. 
.RE
.PP
\fBReturns\fP
.RS 4
true if the string is a valid version, false otherwise\&. 
.RE
.PP

.SH "Author"
.PP 
Generated automatically by Doxygen for common_util from the source code\&.
